You can use the html-minifier npm package to minify HTML. First, install the package: npm install html-minifier. Now, you can use the package like this:
The html-minifier npm package provides a command line interface that makes it possible to minify HTML. This can be useful when working with a site built ...
HTMLMinifier is made by kangax, using tweaked version of HTML parser by John Resig (which, in its turn, is based on work of Erik Arvidsson). Source and ...
HTMLMinifier is a highly configurable, well-tested, JavaScript-based HTML minifier. Installation From NPM for use as a command line app: npm install html- ...